<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:74:"E:\phpStudy\PHPTutorial\WWW\yzf/application/admin\view\authrule\index.html";i:1556011192;s:71:"E:\phpStudy\PHPTutorial\WWW\yzf\application\admin\view\common\head.html";i:1556002984;}*/ ?>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>聚财国际</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/public/static/css/font.css"> 
	<link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" /> 
    <link rel="stylesheet" href="/public/static/css/xadmin.css">
    <link href="/public/static/lib/layui/css/layui.css" rel="stylesheet">
    <script type="text/javascript" src="/public/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/public/static/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/css">
      #fff{
        border: red solid 1px;
      }
    </script>
  </head>
  
<link rel="stylesheet" type="text/css" href="/public/static/classify/css/public.css" />
<style type="text/css">
    .category-box {
        width: 100%;
        overflow: hidden;
    }

    .up-btn {
        transition: transform .3s;
        -webkit-transition: transform .3s;
        -moz-transition: transform .3s;
        -ms-transition: transform .3s;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .up-btn-on {
        transform: rotate(-90deg);
        -webkit-transform: rotate(-90deg);
        -moz-transform: rotate(-90deg);
        -ms-transform: rotate(-90deg);
    }
</style>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
              <a><cite>首页</cite></a>
              <a><cite>演示</cite></a>
              <a><cite>权限管理</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"  href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-form-pane" style="margin-top: 15px;">
        <div class="layui-form-item">
            <!--<button class="layui-btn" onclick="classify_add_two('500','400')">-->
                <!--<i class="layui-icon">&#xe608;</i>添加二级分类-->
            <!--</button>-->
            <button class="layui-btn" onclick="x_admin_show('添加二级菜单','<?php echo url('admin/authrule/add'); ?>')">
                <i class="layui-icon">&#xe608;</i>添加二级分类
            </button>
        </div>
    </div>
    <div class="layout-container">
        <div class="layout-cont">
            <div class="layout-cont-main">
                <div class="add-newclass">
                    <form action="">
                        <div class="category-cont">
                            <!--大分类-->
                            <?php if(is_array($res) || $res instanceof \think\Collection || $res instanceof \think\Paginator): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$one): $mod = ($i % 2 );++$i;if($one['pid']==0): ?>
                            <div class="big-box category-box">
                                <div class="big-category category">
                                    <input type="text" readonly="readonly" value="一级分类：<?php echo $one['title']; ?>" />
                                    <div class="btns">
                                        <a class="up-btn"><img src="/public/static/classify/img/icon_bottom.png" /></a>
                                    </div>
                                </div>
                                <!--子分类-->
                                <?php if(is_array($res) || $res instanceof \think\Collection || $res instanceof \think\Paginator): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$two): $mod = ($i % 2 );++$i;if($two['condition']==2&&$one['id']==$two['pid']): ?>
                                <div class="in-box category-box">
                                    <div class="in-category category">
                                        <input type="text" readonly="readonly" value="二级分类：<?php echo $two['title']; ?>" />
                                        <div class="btns">
                                            <a class="up-btn"><img src="/public/static/classify/img/icon_bottom.png" /></a>
                                            <a><img onclick="classify_edit_menu(<?php echo $two['id']; ?>)" src="/public/static/classify/img/icon_edit.png" /></a>
                                        </div>
                                    </div>
                                    <!--小分类-->
                                    <?php if(is_array($res) || $res instanceof \think\Collection || $res instanceof \think\Paginator): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$three): $mod = ($i % 2 );++$i;if($three['condition']==3&&$two['id']==$three['pid']): ?>
                                    <div class="small-box category-box">
                                        <div class="small-category category">
                                            <input type="text" readonly="readonly" value="三级分类：<?php echo $three['title']; ?>" />
                                            <div class="btns">
                                               
                                            </div>
                                        </div>
                                    </div>
                                    <?php endif; endforeach; endif; else: echo "" ;endif; ?>
                                </div>
                                <?php endif; endforeach; endif; else: echo "" ;endif; ?>
                            </div>
                            <?php endif; endforeach; endif; else: echo "" ;endif; ?>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">
        $('.category-cont').on('click', '.up-btn', function() {
            var _this = $(this);
            _this.toggleClass('up-btn-on');
            var category = _this.parents('.category');
            category.parent().height('auto');
            category.siblings('.category-box').stop().slideToggle(300);
        })
    </script>
</div>
<script>
   
   
	//编辑菜单信息
    function classify_edit_menu(id){
		    //alert(id);
				
				//var mid=$(data).attr('attr_id');
				//alert(mid);
				var url='<?php echo URL('authrule/updatetwo'); ?>?id='+id;
				//alert(url);

				x_admin_show('修改二级菜单',url) 
		}
    /*时间戳转时间*/
    function getLocalTime(nS) {
        return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/,' ');
    }
</script>
</body>
</html>